package com.authorization.demo.service.impl;

import com.authorization.demo.entity.RoleTable;
import com.authorization.demo.mapper.RoleTableMapper;
import com.authorization.demo.service.RoleTableService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Remarks:
 * @ClassName: RoleTableServiceImpl
 * @Author: Micora
 * @CreateTime: 2022/7/20
 */
@Service
@Slf4j
public class RoleTableServiceImpl extends ServiceImpl<RoleTableMapper, RoleTable> implements RoleTableService {

    @Resource
    RoleTableMapper roleTableMapper;

    @Override
    public boolean FindOneIsExist(String roleName) {
        if (roleTableMapper.selectById(roleName) != null) {
            return true;
        }
        return false;
    }
}
